Global Index
HTML5 JS API Index > DOM Tutorials & Specs

ParentNode

Implemented by Document, DocumentFragment, Element

This type groups properties and / or operations together for documentation purposes and does not have an explicit JavaScript representation.

Properties
unsigned long
childElementCount
The childElementCount attribute must return the number of children of the context object that are elements.
HTMLCollection
children
The children attribute must return an HTMLCollection collection rooted at the context object matching only element children.
Element?
firstElementChild
The firstElementChild attribute must return the first child that is an element, and null otherwise.
Element?
lastElementChild
The lastElementChild attribute must return the last child that is an element, and null otherwise.
Operations
voidappend((Node or DOMString) nodes...)
voidprepend((Node or DOMString) nodes...)
Element?
query(DOMString relativeSelectors)
The query(relativeSelectors) method must return the first result of running match a relative selectors string relativeSelectors against a set consisting of context object, and null if the result is an empty list.
Elements
queryAll(DOMString relativeSelectors)
The queryAll(relativeSelectors) method must return an Elements array initialized with the result of running match a relative selectors string relativeSelectors against a set consisting of context object.
Element?
querySelector(DOMString selectors)
The querySelector(selectors) method must return the first result of running scope-match a selectors string selectors against the context object, and null if the result is an empty list otherwise.
NodeList
querySelectorAll(DOMString selectors)
The querySelectorAll(selectors) method must return the static result of running scope-match a selectors string selectors against the context object.